Skip to content

feat: All language options to chrome plugin#123

Open
kevmoo wants to merge 1 commit intomainfrom
better_chrome_plugin
Open

feat: All language options to chrome plugin#123
kevmoo wants to merge 1 commit intomainfrom
better_chrome_plugin

Conversation

@kevmoo
Copy link
Collaborator

@kevmoo kevmoo commented Feb 13, 2026

No description provided.

@gemini-code-assist
Copy link
Contributor

Summary of Changes

Hello @kevmoo, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request enhances the genkit_chrome package by introducing support for defining expected input and output languages for local AI models. This functionality allows for more precise control over how the AI processes and generates content, which is particularly useful for multilingual applications. The changes span across core interop definitions, model configuration, and a demonstration within the sample application's user interface and logic.

Highlights

  • Language Model Options Extension: Extended the LanguageModelOptions with new properties, expectedInputs and expectedOutputs, to allow for specifying expected input and output types and languages for the Chrome local AI.
  • Chrome Model Integration: Integrated the new expectedInputs and expectedOutputs into the ChromeModel's configuration parsing and model creation logic, including new helper functions for parsing these settings from dynamic configurations.
  • Sample Application UI Update: Updated the sample application's user interface (index.html) to include dedicated input fields for users to specify comma-separated expected input and output languages.
  • Sample Application Logic Update: Modified the sample application's main.dart to read the new expected input and output language settings from the UI and pass them correctly to the ChromeModel during AI generation calls.
Changelog
  • packages/genkit_chrome/lib/src/chrome_interop.dart
    • Added expectedInputs and expectedOutputs properties to the LanguageModelOptions factory and external getters.
    • Defined new LanguageModelExpectedInput and LanguageModelExpectedOutput extension types.
    • Updated the initialPrompts getter to be nullable.
  • packages/genkit_chrome/lib/src/chrome_model.dart
    • Modified the ChromeModel to incorporate expectedInputs and expectedOutputs into the model creation process.
    • Introduced _parseExpectedInputs and _parseExpectedOutputs helper functions to handle parsing of these new configuration options.
  • testapps/genkit_chrome_sample/web/index.html
    • Added new HTML input elements for expectedInputLanguages and expectedOutputLanguages to the settings section.
  • testapps/genkit_chrome_sample/web/main.dart
    • Declared new HTMLInputElement references for the expected language fields.
    • Implemented logic to parse comma-separated language inputs from the UI.
    • Updated the _submit function to include expected input and output languages in the ai.generate configuration.
Activity
  • No specific activity (comments, reviews, progress) has been recorded for this pull request yet.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request adds support for expectedInputs and expectedOutputs to the Chrome AI model, which is a valuable enhancement. The changes include updates to the interop layer, the model implementation, and the sample application UI. The implementation is solid, and the identified areas for reducing code duplication by introducing helper functions remain valid suggestions for improving maintainability.

@kevmoo kevmoo changed the title wip feat: All language options to chrome plugin Feb 17, 2026
@kevmoo kevmoo marked this pull request as ready for review February 17, 2026 07:04
@kevmoo kevmoo force-pushed the better_chrome_plugin branch from 951a420 to 257b366 Compare February 17, 2026 07:34
@kevmoo kevmoo requested a review from pavelgj February 17, 2026 07:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant